﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MH.Lib.Data;

namespace MH.Lib.Serialization
{
    public interface ISerializer
    {
        /// <summary>
        /// Attempts to serialize data to given filename
        /// </summary>
        /// <param name="data"> Source data </param>
        /// <param name="filename"> Target filename </param>
        /// <returns> True if successful, false otherwise </returns>
        bool Serialize(IPersonContainer data, string filename);

        /// <summary>
        /// Attempts to deserialize data from given filename
        /// </summary>
        /// <param name="filename"> Source filename </param>
        /// <param name="data"> Target data </param>
        /// <returns> True if successful, false otherwise </returns>
        bool Deserialize(string filename, out IPersonContainer data); 
    }
}
